package com.song.server.service;

import com.song.server.entity.Admin;
import com.baomidou.mybatisplus.extension.service.IService;
import com.song.server.entity.Menu;
import com.song.server.entity.Role;
import com.song.server.vo.RespBean;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author inkolopolookni
 * @since 2021-10-19
 */
public interface AdminService extends IService<Admin> {

    RespBean login(String username, String password, String code, HttpServletRequest request);

    Admin getAdminByName(String username);

    List<Menu> getMenusByAdminId();

    // 根据用户id获取具有的角色列表
    List<Role> getRoles(Integer adminId);

    List<Admin> getAllAdmins(String keywords);

    RespBean updateAdminRole(Integer adminId, Integer[] rids);
}
